package iohomework;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;

public class OOSDemo {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos=new FileOutputStream("zy.txt");
        ObjectOutputStream oos=new ObjectOutputStream(fos);
        String otherInfo="综合棋牌第一名儿，爱好是直播打赏，特长是拷打舰长.";
        Student zy=new Student("战鹰",28,"女",otherInfo);
        oos.writeObject(zy);
        System.out.println("写入成功");
        oos.close();
    }
}
